package com.gitee.neuray.security.auth.feign.hystrix;

import com.gitee.neuray.security.admin.authority.PermissionElementDto;
import com.gitee.neuray.security.admin.dto.LoginUserDto;
import com.gitee.neuray.security.admin.dto.PmUserDto;
import com.gitee.neuray.security.auth.feign.IUserServiceFeignClient;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

@Slf4j
public class PmUserServiceFallback implements IUserServiceFeignClient {
    @Override
    public PmUserDto validate(LoginUserDto loginUser) {
        log.error("用户验证接口降级处理,accout>>>>>>{}",loginUser.getUserName());
        return new PmUserDto();
    }

    @Override
    public List<PermissionElementDto> getPermissionByUserId(String userId) {
        log.error("根据userId获取权限信息接口降级处理,accout>>>>>>{}",userId);
        return Lists.newArrayList();
    }


}
